Skip to content

Conversation

@robwgreenjr
Copy link

@robwgreenjr robwgreenjr commented Oct 7, 2025

Current defaults for Oracle and SQL Server were set to 53 and both have max precision values of 38 (SQL Server Docs).

Max precision limits:
Oracle -> 38
Postgres -> 1000
SQL Server -> 38
MariaDB -> 65

This was locally tested on the current and oldest supported versions for both databases.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19749

@robwgreenjr robwgreenjr marked this pull request as ready for review October 8, 2025 13:13
@beikov
Copy link
Member

beikov commented Nov 6, 2025

Going to close the PR since this is not a valid fix for the problem. Dialect#getDoublePrecision specifies that it uses binary digit count, so simply returning decimal digit count is not going to fix this. The problem is somewhere else, where the binary digit count is not properly translated to decimal digit count. Overall, the problem is due to the mix of double (a binary float type) and NumericJdbcType (an exact decimal type). Precision and scale for the two types don't mix well.

@beikov beikov closed this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants